/** 布局页面 */
import React, { Component } from 'react'

// import {
//   NavLink
// } from "react-router-dom"

import RouterView from '../router/RouterView'

// 引入布局模块
import { Layout } from 'antd';
// 从布局模块中解构 结构模块
const { Header, Footer, Sider, Content } = Layout;
// 引入样式
import './Main.css'

// 引入侧边栏
import CusHeader from '../components/CusHeader';


export default class Main extends Component {
  render() {
    return (
      <div className='main'>
        <Layout>
          <Sider width="auto">
            <div className="logo">
              <div className="logo-img"></div>
            </div>
            <CusHeader {...this.props} />
          </Sider>
          <Layout>
            <Header>Header</Header>
            <Content>
              页面主体内容部分:直接使用二级路由
              <hr />
              <RouterView routes={this.props.children} />
            </Content>
            <Footer>Footer</Footer>
          </Layout>
        </Layout>
      </div>
    )
  }
}
